Repository navigation
Fix RUC soil moisture/temperature init from 4-layer first-guess soil - #332
Open
LarissaReames wants to merge 2 commits into
Open
LarissaReames wants to merge 2 commits into
LarissaReames wants to merge 2 commits into
Conversation
init_soil_properties_ruc (nFGSoilLevels == 4 path) had two coding errors, both different from WRF's share/module_soil_pre.F (init_soil_3_real): - The RUC bucket sum smtotr was set to smtotn + smois(k)*dzs(k) inside the loop instead of accumulating, so the Noah-bucket correction used Noah's total plus only the last RUC layer, drying the RUC column to ~0.76 of the Noah water instead of the intended 1/0.9. - The 3 m anchor was written to zhave(nFGSoilLevels) instead of zhave(nFGSoilLevels+2), overwriting the 4th first-guess depth, so the first-guess 100-200 cm layer was never used and tmn never reached 3 m. Only smois and tslb on land change, only for 9-level (RUC) start files made from 4-layer first-guess soil (e.g. GFS).
…p-anchor Fix RUC soil moisture/temperature init from 4-layer first-guess soil
LarissaReames
requested review from
clark-evans and
dustinswales
as code owners
December 2, 2026 19:54
clark-evans
requested review from
XiaSun-Atmos,
harsh-kamath and
joeolson42
and
a balanced review from Copilot
December 2, 2026 20:52
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the RUC soil-initialization corrections.
No open issues 🎉
What changed in this PR
Fixes two errors in MPAS’s nine-level RUC soil initialization from four-layer first-guess soil data.
Changes:
- Places the 3 m depth anchor in the correct array entry for interpolation.
- Correctly accumulates the RUC soil-moisture total before rescaling.
| File | Description |
|---|---|
src/core_atmosphere/physics/mpas_atmphys_initialize_real.F |
Corrects the depth-anchor index and moisture accumulation in RUC initialization. |
Review effort: Balanced
JeffBeck-NOAA
approved these changes
Dec 3, 2026
XiaSun-Atmos
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
init_atmospheremakes a 9-level RUC start file (config_nsoillevels = 9) from 4-layer first-guess soil (nFGSoilLevels == 4, e.g. GFS),init_soil_properties_rucinsrc/core_atmosphere/physics/mpas_atmphys_initialize_real.Fhas two coding errors. Both differ from the WRF routine it was ported from (share/module_soil_pre.F,init_soil_3_real).Effects:
This PR fixes the two lines and changes nothing else.
The bugs
Bug 1: the RUC bucket sum never accumulates (line 775)
smtotrholds Noah's bucket plus only the last RUC layer, not the RUC column.smois = smois*smtotn/(0.9*smtotr), then scales levels 1-8 by too small a factor. The RUC column ends at about 0.76 of the Noah water.smtotn/0.9, about 1.11 times the Noah water, as in WRF (see Background below).smtotr = smtotr + smois(k)*dzs(k)(module_soil_pre.F, WRF 4.7.1 lines 2072-2076).Fix:
smtotr(iCell)=smtotn(iCell) + ...→smtotr(iCell)=smtotr(iCell) + ...Bug 2: the 3 m anchor overwrites the 4th first-guess depth (line 756)
zhavehasnFGSoilLevels+2entries:st_inputholdstmnandsm_inputrepeats the deepest value.tmnnever reaches 3 m.zhave(num_st_levels_input+2) = 300./100.(module_soil_pre.F, WRF 4.7.1 lines 1987 and 2042).zhave(nFGSoilLevels+2,iCell).Fix:
zhave(nFGSoilLevels,iCell)→zhave(nFGSoilLevels+2,iCell)Background
Where these lines came from
zhave(nFGSoilLevels+2,iCell) = 300._RKIND/100._RKIND ! Set depth of bottom of last layer to 3m.init_soil_3_real, not choices.Background: the 0.9 factor
factorsmstep.factorsmas they are.What changes and what does not
Changes: only
smoisandtslb, only on land cells, only in 9-level RUC start files made from 4-layer first-guess soil.Unchanged:
nFGSoilLevels == 9input branch (RAP/HRRR initial conditions);Not addressed by this PR:
init_soil_layers_depthleaveszs_fgat the layer bottoms (10, 40, 100, 200 cm).Impact
Measured on a Europe 3 km domain on three August 2026 starts. GFS supplied the land fields; another model's analysis supplied the atmosphere.
Start-file soil water (checked against the routine's own target, not observations)
We made two start files from the same GFS soil input: a 4-level (Noah) file and a 9-level (RUC) file. The reference column below is the first-guess water as the 4-level file carries it. It is the routine's target, not an observation.
Top-1 m soil moisture, land mean (m3/m3):
Column water ratio RUC / 4-level (median over land):
Deep soil temperature
The 3 m level becomes
tmn.Land-mean changes:
Levels 0-0.3 m are unchanged.
Forecasts (checked against observations)
The suite was hrrrv5: RUC LSM, MYNN, Thompson/TEMPO. We ran 48 h forecasts with MPAS 8.4.2 physics on the same three starts and verified them against METAR 2 m observations:
This is the only comparison with observations. Soil moisture itself was not verified against observations (e.g. SMAP or ISMN).
Operational relevance
RRFS cold starts from GFS take this path (
nfgsoillevels = 4, 9 RUC levels). The dried soil then carries through soil cycling from that first cold start.Testing
The tests used the same two-line change applied to MPAS 8.4.2 (NOAA fork). The code we tested is equivalent to
noaa/developon this path:init_soil_properties_ructhere is identical tonoaa/developapart from these two lines;init_soil_layers_depthis also unchanged (noaa/develop's new 10-level Noah-MP option does not touch it).smoisandtslbdiffer, only on landsmoisvs an independent offline (numpy, float64) version of the fixed routineA build and run from this exact branch will follow as a comment.
Mandatory Questions
smoisandtslb.Reviews
cc: @JeffBeck-NOAA @clark-evans